import http from "@/utils/http";
import {EnumAlias} from "@/utils/common";

export function securityBlockPage(params?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/securityBlock/page`,
    method: "get",
    params
  });
}

export function securityBlockDetail(params?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/securityBlock/detail`,
    method: "get",
    params
  });
}

export function securityBlockDelete(data?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/securityBlock/delete`,
    method: "post",
    data
  });
}

export function securityBlockAdd(data?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/securityBlock/create`,
    method: "post",
    data
  });
}

export function securityBlockEdit(data?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/securityBlock/update`,
    method: "post",
    data
  });
}

export function menuGetResourceTree(params?: object) {
  return http({
    url: `${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/menu/getResourceTree`,
    method: "get",
    params
  });
}

export function builderTableTree(params?: object) {
  return http({
    url: `${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/builderTable/tree`,
    method: "get",
    params
  });
}

export function builderTableColumnSimpleList(params?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/builderTableColumn/simpleList`,
    method: "get",
    params
  });
}

export function securityFieldGetRowProperty(params?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/securityField/getRowProperty`,
    method: "get",
    params
  });
}

export function securityFieldGetColProperty(params?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/securityField/getColProperty`,
    method: "get",
    params
  });
}

export function assignRowProperty(data?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/securityField/assignRowProperty`,
    method: "post",
    data
  });
}

export function assignColProperty(data?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/securityField/assignColProperty`,
    method: "post",
    data
  });
}

export function assignProcessorProperty(data?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/securityField/assignProcessorProperty`,
    method: "post",
    data
  });
}

export function getProcessorProperty(params?: object) {
  return http({
    url: `/${EnumAlias.PROJECT}/${EnumAlias.MODULE_SYS}/securityField/getProcessorProperty`,
    method: "get",
    params
  });
}
